<!-- 
 - Copyright 2012 OmniFaces.
 -
 - Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 - the License. You may obtain a copy of the License at
 -
 -     http://www.apache.org/licenses/LICENSE-2.0
 -
 - Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 - an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 - specific language governing permissions and limitations under the License.
 -->
<!DOCTYPE html>
<html lang="en"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:o="http://omnifaces.org/ui"
>
	<h:head>
		<title><ui:insert name="title">OmniFaces Showcase - #{page.current.title}</ui:insert></title>
		<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
		<link rel="shortcut icon" href="#{request.contextPath}/favicon.ico" />
		<h:outputStylesheet library="layout" name="css/layout.css" />
		<h:outputScript>
			var _gaq = _gaq || [];
			_gaq.push(['_setAccount', 'UA-29559297-3']);
			_gaq.push(['_trackPageview']);
		
			(function() {
				var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
				ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
				var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
			})();
		</h:outputScript>
	</h:head>

	<h:body>
		<p:panel id="header" styleClass="ui-widget-header">
			<h1>
				<a href="#{request.contextPath}/">
					<h:graphicImage library="layout" name="img/logo-70x70.png" alt="logo" width="70" height="70" />
					OmniFaces Showcase
				</a>
			</h1>
			<div id="poweredBy">
				<strong>Powered by</strong><br/>#{app.poweredBy}
			</div>
		</p:panel>

		<p:panel id="menu">
			<p:panel header="omnifaces">
				<ul>
					<li><h:link value="Showcase homepage" outcome="/index.xhtml" styleClass="#{view.viewId == '/index.xhtml' ? 'active' : ''}" /></li>
					<li><a href="http://code.google.com/p/omnifaces">Project homepage</a></li>
					<li><a href="http://wiki.omnifaces.googlecode.com/hg/javadoc/index.html">API documentation</a></li>
					<li><a href="http://wiki.omnifaces.googlecode.com/hg/vdldoc/index.html">VDL documentation</a></li>
				</ul>
			</p:panel>
			<o:tree value="#{app.menu}" var="page">
				<o:treeNode level="0">
					<o:treeNodeItem>
						<p:panel header="#{page.title}">
							<o:treeInsertChildren />
						</p:panel>
					</o:treeNodeItem>
				</o:treeNode>
				<o:treeNode>
					<ul>
						<o:treeNodeItem>
							<li>
								<h:link value="#{page.title}" outcome="#{page.viewId}" styleClass="code#{view.viewId == page.viewId ? ' active' : ''}" />
							</li>
						</o:treeNodeItem>
					</ul>
				</o:treeNode>
			</o:tree>
		</p:panel>

		<p:panel id="content">
			<h2><ui:insert name="contentTitle"><code>#{page.current.title}</code></ui:insert></h2>
			<ui:insert name="content" />
		</p:panel>
	</h:body>
</html>